#发布 打包
registry=127.0.0.1:80
repository_name=blog-caicai
git_commit_id=`git rev-parse --short HEAD`
commit_time=`date +%Y%m%d%H%M%S`

export NODE_ENV=$1
#npm install 
docker build -t ${registry}/${repository_name}:${commit_time}_${git_commit_id} .
echo ${registry}/${repository_name}:${commit_time}_${git_commit_id}
docker run -d -p 80:80 ${registry}/${repository_name}:${commit_time}_${git_commit_id}